public boolean isCompleteTree(Node root){
        if(root == null){
            return true;
        }
        Queue<Node> queue = new LinkedList<>();
        queue.offer(root);
        while(true){
            Node temp = queue.poll();
            if(temp != null) {
                queue.offer(temp.left);
                queue.offer(temp.right);
            }else{
                while(!queue.isEmpty()){
                    if(queue.poll() != null){
                        return false;
                    }
                }
                return true;
            }
        }
    }